<?php
declare(strict_types=1);

namespace app\api\controller;

use app\basic\ApiController;
use support\Request;
use app\admin\logic\system\SystemUploadfileLogic;
use support\Response;
use hg\apidoc\annotation as Apidoc;

/**
 * @Apidoc\Title("文件上传")
 */
class UploadController extends ApiController
{
    private $config;

      // 无需登录的接口,*表示全部
    protected $noNeedLogin = ['*'];

    /**
     * 构造方法
     */
    public function __construct()
    {
        parent::__construct();
        // 存储配置信息
        $this->logic = new SystemUploadfileLogic();
    }

     /**
     * @Apidoc\Title("上传文件")
     * @Apidoc\Method("POST")
     * @Apidoc\Param("image", type="file", require=true, desc="文件",example="1")
     */
    public function upload(Request $request)
    {
       return $this->success($this->logic->uploadBase());
    }


}